﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

using Weazel.Badger.Vhdl;
using Weazel.Badger.Vhdl.Statements;
using Weazel.Badger.Vhdl.Expressions;

#endregion

namespace Weazel.Badger.Predefined
{
  public class SignalConnectionProcess : Process
  {
    public SignalConnectionProcess(string name, Entity parent) : base(name, parent)
    {
    }

    public void ConnectSignals(Signal sink, Signal source)
    {
      AddSignalToSensivitityList(source);

      SignalAssignmentStatement stmt =
        new SignalAssignmentStatement(
          sink,
          new SignalReferenceExpression(Statements, source)
        );

      Statements.Add(stmt);
    }
  }
}
